﻿
using EntitiesAndMappings.Entities;
using FluentNHibernate.Mapping;

namespace EntitiesAndMappings.Maps
{
    public class ProveedorMap : ClassMap<Proveedor>
    {
        public ProveedorMap()
        {
            Id(x => x.Id);
            Map(x => x.Ruc).Length(15).Unique().Not.Nullable();
            Map(x => x.RazonSocial).Length(100).Not.Nullable();
            Map(x => x.Direccion).Length(100).Nullable();
            Map(x => x.Telefono).Length(20).Nullable();
            Map(x => x.Fax).Length(20).Nullable();
            Map(x => x.Contacto).Length(100).Nullable();
            Map(x => x.Email).Length(50).Nullable();
            Map(x => x.Estado).Length(1).Not.Nullable();
        }
    }
}
